package cn.wolfcode.web.controller;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;

/**
 * Created by wolfcode-lanxw
 */
//@Controller
public class TestController {
    //@RequestMapping("/test")
    @ResponseBody
    public String test(){
        RestTemplate restTemplate = new RestTemplate();
        String url = "https://way.jd.com/showapi/dtgxt?page=1&maxResult=20&appkey=e958d66d2ee24e77714e034ba0fd9698";
        String str = restTemplate.getForObject(url, String.class);
        System.out.println(str);
        return str;
    }
}
